<!doctype html>
<html lang="en">
<head>
    <title>API for class phpapi (phpAPI: PHP Documentation Creator version 6.0)</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="generator" content="phpAPI 6.0 (https://github.com/Greenray/phpAPI/)">
    <link rel="stylesheet" type="text/css" href="../style.css">
    <link rel="start" href="../index.html">
</head>
    <body id="phpapi" onload="parent.document.title=document.title;">
    <div class="header">
    <span style="float:right">phpAPI v6.0</span>
            <ul>
                    <li><a href="../overview-summary.html">Overview</a></li>
                    <li><a href="../phpapi/package-summary.html">Namespace</a></li>
                    <li class="active">Class</li>
                    <li><a href="../phpapi/package-tree.html">phpapi\Tree</a></li>
                    <li><a href="../deprecated.html">Deprecated</a></li>
                    <li><a href="../todo.html">Todo</a></li>
                    <li><a href="../index-all.html">Index</a></li>
                </ul>
    </div>
<hr />
<div class="small_links">Frames: <a href="../index.html" target="_top"> On</a> | <a href="" target="_top"> Off</a></div>
<hr />
    <div class="small_links">
        <a href="#details_fields">Fields</a> | <a href="#details_methods">Methods</a> | <a href="#details_constructor">Constructor</a>
    </div>
    <hr />
<div class="package">Namespace phpapi</div>
<h1>Class phpapi</h1>
<div id="list">
    <ul>
        <li><strong>phpapi</strong></li></ul></li>    </ul>
</div>
<hr />
<p class="arguments">public  class <strong>phpapi</strong></p>
<div class="comment" id="overview_description">php tokenizer and parser.<br /> Particularly the packages, classes and options specified by the user.<br /> It is the root of the parsed tokens and is passed to the doclet to be formatted into output.</div>
<div class="finfo">
    <table class="hid">
            <tr>
            <td class="hid left w_100">Program</td>
            <td class="hid right w_100 lilac">&nbsp;</td>
                            <td class="hid" colspan="2">phpapi: PHP Documentation Creator</td>
                    </tr>
            <tr>
            <td class="hid left w_100">Version</td>
            <td class="hid right w_100 lilac">&nbsp;</td>
                            <td class="hid" colspan="2">6.0</td>
                    </tr>
            <tr>
            <td class="hid left w_100">Author</td>
            <td class="hid right w_100 lilac">&nbsp;</td>
                            <td class="hid" colspan="2">Victor Nabatov greenray.spb@gmail.com</td>
                    </tr>
            <tr>
            <td class="hid left w_100">Copyright</td>
            <td class="hid right w_100 lilac">&nbsp;</td>
                            <td class="hid" colspan="2">(c) 2015-2016 Victor Nabatov</td>
                    </tr>
            <tr>
            <td class="hid left w_100">License</td>
            <td class="hid right w_100 lilac">&nbsp;</td>
                            <td class="hid" colspan="2">Creative Commons Attribution-ShareAlike 4.0 International</td>
                    </tr>
            <tr>
            <td class="hid left w_100">File</td>
            <td class="hid right w_100 lilac">&nbsp;</td>
                            <td class="hid" colspan="2">/system/classes/phpapi.php</td>
                    </tr>
            <tr>
            <td class="hid left w_100">Overview</td>
            <td class="hid right w_100 lilac">&nbsp;</td>
                            <td class="hid" colspan="2">Main program package.
 It sets global variables, loads classes, tokenizes and parses php files.
 After that it creates descriptions of the program elements and calls doclet to create documentation pages.</td>
                    </tr>
        </table>
</div>
    <h2 id="details_fields">Fields</h2>
            <div class="location">system/classes/phpAPI.php at line 21</div>
        <pre class="arguments" id="doclet">public  string <strong><span class="green">$doclet</span></strong> = <span class="red">""</span>;</pre>
        <div class="details">Specifies the name of the class that starts the doclet used in generating the documentation</div>
        <hr />
            <div class="location">system/classes/phpAPI.php at line 24</div>
        <pre class="arguments" id="files">public  array <strong><span class="green">$files</span></strong> = [];</pre>
        <div class="details">Files to parse</div>
        <hr />
            <div class="location">system/classes/phpAPI.php at line 27</div>
        <pre class="arguments" id="options">public  array <strong><span class="green">$options</span></strong> = [];</pre>
        <div class="details">Options from config file</div>
        <hr />
            <div class="location">system/classes/phpAPI.php at line 30</div>
        <pre class="arguments" id="path">public  string <strong><span class="green">$path</span></strong> = <span class="red">"."</span>;</pre>
        <div class="details">Path phpapi is running from</div>
        <hr />
            <div class="location">system/classes/phpAPI.php at line 36</div>
        <pre class="arguments" id="source">public  string <strong><span class="green">$source</span></strong> = [<span class="red">"./"</span>];</pre>
        <div class="details">Directory containing files for parsing</div>
        <hr />
            <div class="location">system/classes/phpAPI.php at line 33</div>
        <pre class="arguments" id="sourceIndex">public  integer <strong><span class="green">$sourceIndex</span></strong> = 0;</pre>
        <div class="details">Number of parsed source files</div>
        <hr />
            <div class="location">system/classes/phpAPI.php at line 39</div>
        <pre class="arguments" id="startTime">private  integer <strong><span class="green">$startTime</span></strong> = 0;</pre>
        <div class="details">Time in microseconds of the start of execution</div>
        <hr />
        <h2 id="details_constructor">Constructor</h2>
    <div class="location">system/classes/phpAPI.php at line 47</div>
    <code class="arguments" id="construct">public  void <strong>construct</strong>(<span class="lilac">string</span> <span class="blue">$config</span>)</code>
    <div class="details">
            <p class="description">Constructor.<br /> Parses ini file and creates list of files for processing.</p>
        <div class="finfo">
    <table class="hid">
            <tr>
            <td class="hid left w_100">Parameters</td>
            <td class="hid right w_100 lilac">string</td>
                            <td class="hid blue w_100">$config</td>
                <td class="hid">phpai configuration file (Default = <span class="red">"phpapi.ini"</span>)</td>
                    </tr>
        </table>
</div>
    </div>
    <h2 id="details_methods">Methods</h2>
            <div class="location">system/classes/phpAPI.php at line 104</div>
        <code class="arguments" id="createTag">public  <a href="../tags/tag.html">tag</a> <strong>createTag</strong> (<span class="lilac">string</span> <span class="blue">$name</span>, <span class="lilac">string</span> <span class="blue">$text</span>, <span class="lilac">array</span> <span class="blue">&$data</span>, <a href="../phpapi/rootdoc.html">rootDoc</a> <span class="blue">$root</span>, <span class="lilac">mixed</span> <span class="blue">&$root</span>)</code>
        <div class="details">
                    require_once($tagFile)<br />require_once($tagFile)<br />                    <p class="description">Creates a tag.<br /> This method first tries to load a Taglet for the given tag name, upon failing it<br /> then tries to load a phpapi specialised tag class (e.g. classes/paramtag.php),<br /> if it still has not found a tag class it uses the standard tag class.</p>
            <div class="finfo">
    <table class="hid">
            <tr>
            <td class="hid left w_100">Parameters</td>
            <td class="hid right w_100 lilac">string</td>
                            <td class="hid blue w_100">$name</td>
                <td class="hid">Name of the tag</td>
                    </tr>
            <tr>
            <td class="hid left w_100">&nbsp</td>
            <td class="hid right w_100 lilac">string</td>
                            <td class="hid blue w_100">$text</td>
                <td class="hid">Contents of the tag</td>
                    </tr>
            <tr>
            <td class="hid left w_100">&nbsp</td>
            <td class="hid right w_100 lilac">array</td>
                            <td class="hid blue w_100">&$data</td>
                <td class="hid">Reference to the doc comment data array</td>
                    </tr>
            <tr>
            <td class="hid left w_100">&nbsp</td>
            <td class="hid right w_100 lilac"><a href="../phpapi/rootdoc.html">rootDoc</a></td>
                            <td class="hid blue w_100">$root</td>
                <td class="hid">Reference to the root element</td>
                    </tr>
            <tr>
            <td class="hid left w_100">Return</td>
            <td class="hid right w_100 lilac">tag</td>
                            <td class="hid" colspan="2">Tag object</td>
                    </tr>
        </table>
</div>
        </div>
        <hr />
            <div class="location">system/classes/phpAPI.php at line 143</div>
        <code class="arguments" id="execute">public  void <strong>execute</strong> (<a href="../phpapi/rootdoc.html">rootDoc</a> <span class="blue">&$rootDoc</span>)</code>
        <div class="details">
                    require SYSTEM.<span class="red">"htmlWriter.php"</span><br />require SYSTEM.<span class="red">"overviewSummaryWriter.php"</span><br />require SYSTEM.<span class="red">"packageWriter.php"</span><br />require SYSTEM.<span class="red">"classWriter.php"</span><br />require SYSTEM.<span class="red">"functionWriter.php"</span><br />require SYSTEM.<span class="red">"globalWriter.php"</span><br />require SYSTEM.<span class="red">"indexWriter.php"</span><br />require SYSTEM.<span class="red">"deprecatedWriter.php"</span><br />require SYSTEM.<span class="red">"todoWriter.php"</span><br />require_once $docletFile<br />require_once SYSTEM.$formatter.<span class="red">".php"</span><br />                    <p class="description">Loads and runs the doclet.</p>
            <div class="finfo">
    <table class="hid">
            <tr>
            <td class="hid left w_100">Parameters</td>
            <td class="hid right w_100 lilac"><a href="../phpapi/rootdoc.html">rootDoc</a></td>
                            <td class="hid blue w_100">&$rootDoc</td>
                <td class="hid">Reference to root document</td>
                    </tr>
        </table>
</div>
        </div>
        <hr />
            <div class="location">system/classes/phpAPI.php at line 182</div>
        <code class="arguments" id="getElementName">private  string <strong>getElementName</strong> (<span class="lilac">array</span> <span class="blue">&$tokens</span>, <span class="lilac">integer</span> <span class="blue">$key</span>)</code>
        <div class="details">
                    <p class="description">Gets element name from the token list.</p>
            <div class="finfo">
    <table class="hid">
            <tr>
            <td class="hid left w_100">Parameters</td>
            <td class="hid right w_100 lilac">array</td>
                            <td class="hid blue w_100">&$tokens</td>
                <td class="hid">Reference to the array of tokens</td>
                    </tr>
            <tr>
            <td class="hid left w_100">&nbsp</td>
            <td class="hid right w_100 lilac">integer</td>
                            <td class="hid blue w_100">$key</td>
                <td class="hid">Key to start searching from</td>
                    </tr>
            <tr>
            <td class="hid left w_100">Return</td>
            <td class="hid right w_100 lilac">string</td>
                            <td class="hid" colspan="2">Name of the program element</td>
                    </tr>
        </table>
</div>
        </div>
        <hr />
            <div class="location">system/classes/phpAPI.php at line 207</div>
        <code class="arguments" id="getTime">private  integer <strong>getTime</strong> ()</code>
        <div class="details">
                    <p class="description">Gets the current time in microseconds.</p>
            <div class="finfo">
    <table class="hid">
            <tr>
            <td class="hid left w_100">Return</td>
            <td class="hid right w_100 lilac">integer</td>
                            <td class="hid" colspan="2">Current time</td>
                    </tr>
        </table>
</div>
        </div>
        <hr />
            <div class="location">system/classes/phpAPI.php at line 221</div>
        <code class="arguments" id="getFiles">private  array <strong>getFiles</strong> (<span class="lilac">array</span> <span class="blue">$files</span>, <span class="lilac">string</span> <span class="blue">$dir</span>)</code>
        <div class="details">
                    <p class="description">Builds a complete list of files to parse.<br /> Expands out wildcards and traverse directories if asked to.<br /> This function is recursive.</p>
            <div class="finfo">
    <table class="hid">
            <tr>
            <td class="hid left w_100">Parameters</td>
            <td class="hid right w_100 lilac">array</td>
                            <td class="hid blue w_100">$files</td>
                <td class="hid">Filenames or wildcards</td>
                    </tr>
            <tr>
            <td class="hid left w_100">&nbsp</td>
            <td class="hid right w_100 lilac">string</td>
                            <td class="hid blue w_100">$dir</td>
                <td class="hid">Directory to scan</td>
                    </tr>
            <tr>
            <td class="hid left w_100">Return</td>
            <td class="hid right w_100 lilac">array</td>
                            <td class="hid" colspan="2">List of files to parse</td>
                    </tr>
        </table>
</div>
        </div>
        <hr />
            <div class="location">system/classes/phpAPI.php at line 266</div>
        <code class="arguments" id="getType">private  string <strong>getType</strong> (<span class="lilac">mixed</span> <span class="blue">$var</span>)</code>
        <div class="details">
                    <p class="description">Gets the type of the variable.</p>
            <div class="finfo">
    <table class="hid">
            <tr>
            <td class="hid left w_100">Parameters</td>
            <td class="hid right w_100 lilac">mixed</td>
                            <td class="hid blue w_100">$var</td>
                <td class="hid">Variable</td>
                    </tr>
            <tr>
            <td class="hid left w_100">Return</td>
            <td class="hid right w_100 lilac">string</td>
                            <td class="hid" colspan="2">Type of the variable</td>
                    </tr>
        </table>
</div>
        </div>
        <hr />
            <div class="location">system/classes/phpAPI.php at line 286</div>
        <code class="arguments" id="fixPath">public  string <strong>fixPath</strong> (<span class="lilac">string</span> <span class="blue">$path</span>)</code>
        <div class="details">
                    <p class="description">Addss a trailing slash to a path if it does not have one.</p>
            <div class="finfo">
    <table class="hid">
            <tr>
            <td class="hid left w_100">Parameters</td>
            <td class="hid right w_100 lilac">string</td>
                            <td class="hid blue w_100">$path</td>
                <td class="hid">Path to fix</td>
                    </tr>
            <tr>
            <td class="hid left w_100">Return</td>
            <td class="hid right w_100 lilac">string</td>
                            <td class="hid" colspan="2">Fixed path</td>
                    </tr>
        </table>
</div>
        </div>
        <hr />
            <div class="location">system/classes/phpAPI.php at line 296</div>
        <code class="arguments" id="hasPrivateName">public  boolean <strong>hasPrivateName</strong> (<span class="lilac">string</span> <span class="blue">$name</span>)</code>
        <div class="details">
                    <p class="description">Does the given element name conform to the format that is used for private elements?</p>
            <div class="finfo">
    <table class="hid">
            <tr>
            <td class="hid left w_100">Parameters</td>
            <td class="hid right w_100 lilac">string</td>
                            <td class="hid blue w_100">$name</td>
                <td class="hid">Name to check</td>
                    </tr>
        </table>
</div>
        </div>
        <hr />
            <div class="location">system/classes/phpAPI.php at line 307</div>
        <code class="arguments" id="mergeSuperClassData">public  void <strong>mergeSuperClassData</strong> (<a href="../phpapi/rootdoc.html">rootDoc</a> <span class="blue">&$rootDoc</span>, <span class="lilac">string</span> <span class="blue">$parent</span>)</code>
        <div class="details">
                    <p class="description">Merges data of the superclass.<br /> This function is recursive.</p>
            <div class="finfo">
    <table class="hid">
            <tr>
            <td class="hid left w_100">Parameters</td>
            <td class="hid right w_100 lilac"><a href="../phpapi/rootdoc.html">rootDoc</a></td>
                            <td class="hid blue w_100">&$rootDoc</td>
                <td class="hid">Reference to the root element</td>
                    </tr>
            <tr>
            <td class="hid left w_100">&nbsp</td>
            <td class="hid right w_100 lilac">string</td>
                            <td class="hid blue w_100">$parent</td>
                <td class="hid">Superclass (Default = NULL)</td>
                    </tr>
        </table>
</div>
        </div>
        <hr />
            <div class="location">system/classes/phpAPI.php at line 326</div>
        <code class="arguments" id="next">private  array|boolean <strong>next</strong> (<span class="lilac">array</span> <span class="blue">&$tokens</span>, <span class="lilac">integer</span> <span class="blue">$key</span>, <span class="lilac">integer</span> <span class="blue">$whatToGet</span>, <span class="lilac">integer</span> <span class="blue">$maxDist</span>)</code>
        <div class="details">
                    <p class="description">Gets next token of a certain type from token array.</p>
            <div class="finfo">
    <table class="hid">
            <tr>
            <td class="hid left w_100">Parameters</td>
            <td class="hid right w_100 lilac">array</td>
                            <td class="hid blue w_100">&$tokens</td>
                <td class="hid">Reference to the array of tokens to search</td>
                    </tr>
            <tr>
            <td class="hid left w_100">&nbsp</td>
            <td class="hid right w_100 lilac">integer</td>
                            <td class="hid blue w_100">$key</td>
                <td class="hid">Key to start searching from</td>
                    </tr>
            <tr>
            <td class="hid left w_100">&nbsp</td>
            <td class="hid right w_100 lilac">integer</td>
                            <td class="hid blue w_100">$whatToGet</td>
                <td class="hid">Type of token to look for</td>
                    </tr>
            <tr>
            <td class="hid left w_100">&nbsp</td>
            <td class="hid right w_100 lilac">integer</td>
                            <td class="hid blue w_100">$maxDist</td>
                <td class="hid">Optional max distance from key to look at (default is 0 for all)</td>
                    </tr>
            <tr>
            <td class="hid left w_100">Return</td>
            <td class="hid right w_100 lilac">array|boolean</td>
                            <td class="hid" colspan="2">Value of found token or FALSE</td>
                    </tr>
        </table>
</div>
        </div>
        <hr />
            <div class="location">system/classes/phpAPI.php at line 344</div>
        <code class="arguments" id="parse">public  <a href="../phpapi/rootdoc.html">rootDoc</a> <strong>parse</strong> ()</code>
        <div class="details">
                    <p class="description">Parses files into tokens and create rootDoc.</p>
            <div class="finfo">
    <table class="hid">
            <tr>
            <td class="hid left w_100">Return</td>
            <td class="hid right w_100 lilac">rootDoc</td>
                            <td class="hid" colspan="2">Reference to the root element</td>
                    </tr>
        </table>
</div>
        </div>
        <hr />
            <div class="location">system/classes/phpAPI.php at line 968</div>
        <code class="arguments" id="parseDocComment">public  array <strong>parseDocComment</strong> (<span class="lilac">string</span> <span class="blue">$comment</span>, <span class="lilac">array</span> <span class="blue">$rootDoc</span>, <span class="lilac">mixed</span> <span class="blue">&$root</span>)</code>
        <div class="details">
                    <p class="description">Process a doc comment into a doc tag array.</p>
            <div class="finfo">
    <table class="hid">
            <tr>
            <td class="hid left w_100">Parameters</td>
            <td class="hid right w_100 lilac">string</td>
                            <td class="hid blue w_100">$comment</td>
                <td class="hid">Comment to process</td>
                    </tr>
            <tr>
            <td class="hid left w_100">&nbsp</td>
            <td class="hid right w_100 lilac">array</td>
                            <td class="hid blue w_100">$rootDoc</td>
                <td class="hid">Reference to the root of the parsed tokens</td>
                    </tr>
            <tr>
            <td class="hid left w_100">Return</td>
            <td class="hid right w_100 lilac">array</td>
                            <td class="hid" colspan="2">Array of doc comment data</td>
                    </tr>
        </table>
</div>
        </div>
        <hr />
            <div class="location">system/classes/phpAPI.php at line 1055</div>
        <code class="arguments" id="previous">private  array|boolean <strong>previous</strong> (<span class="lilac">array</span> <span class="blue">&$tokens</span>, <span class="lilac">integer</span> <span class="blue">$key</span>, <span class="lilac">integer</span> <span class="blue">$whatToGet</span>)</code>
        <div class="details">
                    <p class="description">Gets previous token of a certain type from token array.</p>
            <div class="finfo">
    <table class="hid">
            <tr>
            <td class="hid left w_100">Parameters</td>
            <td class="hid right w_100 lilac">array</td>
                            <td class="hid blue w_100">&$tokens</td>
                <td class="hid">Reference to the array of tokens to search</td>
                    </tr>
            <tr>
            <td class="hid left w_100">&nbsp</td>
            <td class="hid right w_100 lilac">integer</td>
                            <td class="hid blue w_100">$key</td>
                <td class="hid">Key to start searching from</td>
                    </tr>
            <tr>
            <td class="hid left w_100">&nbsp</td>
            <td class="hid right w_100 lilac">integer</td>
                            <td class="hid blue w_100">$whatToGet</td>
                <td class="hid">Type of token to look for</td>
                    </tr>
            <tr>
            <td class="hid left w_100">Return</td>
            <td class="hid right w_100 lilac">array|boolean</td>
                            <td class="hid" colspan="2">Value of found token or FALSE</td>
                    </tr>
        </table>
</div>
        </div>
        <hr />
            <div class="location">system/classes/phpAPI.php at line 1070</div>
        <code class="arguments" id="sourcePath">public  string <strong>sourcePath</strong> ()</code>
        <div class="details">
                    <p class="description">Returns the path of sources.</p>
            <div class="finfo">
    <table class="hid">
            <tr>
            <td class="hid left w_100">Return</td>
            <td class="hid right w_100 lilac">string</td>
                            <td class="hid" colspan="2">Path to processing source file</td>
                    </tr>
        </table>
</div>
        </div>
        <hr />
            <div class="location">system/classes/phpAPI.php at line 1079</div>
        <code class="arguments" id="verbose">public  void <strong>verbose</strong> (<span class="lilac">string</span> <span class="blue">$msg</span>)</code>
        <div class="details">
                    <p class="description">Shows a verbose message..</p>
            <div class="finfo">
    <table class="hid">
            <tr>
            <td class="hid left w_100">Parameters</td>
            <td class="hid right w_100 lilac">string</td>
                            <td class="hid blue w_100">$msg</td>
                <td class="hid">Verbose message to output</td>
                    </tr>
        </table>
</div>
        </div>
        <hr />
            <div class="location">system/classes/phpAPI.php at line 1088</div>
        <code class="arguments" id="error">public  void <strong>error</strong> (<span class="lilac">string</span> <span class="blue">$msg</span>)</code>
        <div class="details">
                    <p class="description">Shows an error message.</p>
            <div class="finfo">
    <table class="hid">
            <tr>
            <td class="hid left w_100">Parameters</td>
            <td class="hid right w_100 lilac">string</td>
                            <td class="hid blue w_100">$msg</td>
                <td class="hid">Error message to output</td>
                    </tr>
        </table>
</div>
        </div>
        <hr />
            <div class="location">system/classes/phpAPI.php at line 1097</div>
        <code class="arguments" id="warning">public  void <strong>warning</strong> (<span class="lilac">string</span> <span class="blue">$msg</span>)</code>
        <div class="details">
                    <p class="description">Shows a warning message.</p>
            <div class="finfo">
    <table class="hid">
            <tr>
            <td class="hid left w_100">Parameters</td>
            <td class="hid right w_100 lilac">string</td>
                            <td class="hid blue w_100">$msg</td>
                <td class="hid">Warning message to output</td>
                    </tr>
        </table>
</div>
        </div>
        <hr />
        <div class="header">
    <span style="float:right">phpAPI v6.0</span>
            <ul>
                    <li><a href="../overview-summary.html">Overview</a></li>
                    <li><a href="../phpapi/package-summary.html">Namespace</a></li>
                    <li class="active">Class</li>
                    <li><a href="../phpapi/package-tree.html">phpapi\Tree</a></li>
                    <li><a href="../deprecated.html">Deprecated</a></li>
                    <li><a href="../todo.html">Todo</a></li>
                    <li><a href="../index-all.html">Index</a></li>
                </ul>
    </div>
<hr />
<div class="small_links">Frames: <a href="../index.html" target="_top"> On</a> | <a href="" target="_top"> Off</a></div>
<hr />
    <div class="small_links">
        <a href="#details_fields">Fields</a> | <a href="#details_methods">Methods</a> | <a href="#details_constructor">Constructor</a>
    </div>
    </body>
</html>
